<?php
/**
 * Created by PhpStorm.
 * User: 10037
 * Date: 2022/6/2
 * Time: 20:15
 */

namespace app\admin\model;


use think\Model;

class Order extends Model
{
    protected $pk='id';

    public function userList(){
        return $this->belongsTo(User::class,'userId','id');
    }

    public function busList(){
        return $this->belongsTo(Business::class,'busId','id');
    }

    public function selectOrders($page){
       return $this->with(['userList','busList'])->page($page,10)->select();
    }

    public function selectCount(){
        return $this->count();
    }
}